<?php

$getAlbum = json_encode('all');

if (isset($_GET['album'])) {
    $getAlbum = (string)$_GET['album'];
    $getAlbum = json_encode($getAlbum);
}

?>
<?php require_once 'includes/includes.php'; ?>
<!DOCTYPE HTML>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link type="text/css" rel="stylesheet" href="css/reset.css">
    <link type="text/css" rel="stylesheet" href="css/style.css">
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="js/index_ext.js"></script>
    <title>300img</title>
    <script type="text/javascript">
        var getAlbum = <?php echo $getAlbum; ?>
    </script>





</head>

<body>

<script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-24727141-6']);
    _gaq.push(['_setDomainName', '300img.com']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_trackPageview']);

    (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

</script>


<!--     FB  -->
<div id="fb-root"></div>
<script>(function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=239853692745753";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<header>
    <nav>
        <img src="img/300img-logo.png" style="margin:5px 0px 5px 5px; float:left"/>
        <ul style="width:400px;" id="albums" class="f_left">
            <?php
            $albums = getAlbums();

            foreach ($albums as $album) {

                if (is_dir(ALBUM_PATH_CLEAN . $album['name']) || $album['id'] == 1) {
                    echo '<li><a class="folder" id="album_' . $album['name'] . '" href="/' . $album['id'] . '">' . $album['name'] . '</a></li>';
                }
            }
            ?>
        </ul>
    </nav>
    <div class="pics_menu">
        <ul id="" class="post" style="margin:0 auto; width:100%; display: none;" >
            <li><img src="img/cars/1.jpg" style="max-height: 26px;" /> </li>
            <li><img src="img/cars/2.jpg" style="max-height: 26px;" /> </li>
            <li><img src="img/cars/3.jpg" style="max-height: 26px;" /> </li>
            <li><img src="img/cars/4.jpg" style="max-height: 26px;" /> </li>
            <li>2</li>
            <li>3</li>
        </ul>
    </div>


</header>


<table style="margin:0 auto; margin-top:20px; margin-bottom:20px;">
    <colgroup width="62px;"></colgroup>
    <colgroup width="660px;"></colgroup>
    <colgroup width="62px;"></colgroup>
    <tr>
        <td><a href="#" id="left" class="f_right r_button"></a></td>
        <td style="vertical-align: middle;">

            <!--  START  -->
            <!-- Първоначална позиция на големия банер -->


            <div id="banner_s">
                <div id="small" style="width: 468px; height: 60px; margin: 0 auto; box-shadow:0px 0px 30px #bbb;">

                    <script type="text/javascript"><!--
                    google_ad_client = "ca-pub-5472762465737265";
                    /* 468x60_new */
                    google_ad_slot = "8327790799";
                    google_ad_width = 468;
                    google_ad_height = 60;
                    //-->
                    </script>

                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                    </script>

                </div>
            </div>


            <!--  END  -->

        </td>
        <td><a href="#" id="right" class="l_button f_left"></a></td>
    </tr>
</table>

<table style="margin: 0 auto;">
    <colgroup>
        <col style="width: 170px;" />
        <col style="width: 50px;" />
        <col style="width: 170px;" />
    </colgroup>
    <tr>
        <td>


        </td>
        <td>
            <ul id="info" class="post" style="margin:0 auto; width:100%;">
                <?php echo getPics(); ?>
            </ul>
            <div id="fb-root"></div>
        </td>
        <td style="padding-left: 10px; vertical-align: top;">
            <div class="content-category" style="display: none">
                <h3>Ime na papka</h3>
                <!-- Hide on Mouse out -->
                <div class="content">
                    Lamborghini's Sant'Agata Bolognese production facility produces V12 engines and finished automobiles. Lamborghini's current production vehicles are the V10-powered Gallardo and the V12-powered Aventador. Both production models are available in a variety of regular and limited-edition specifications.
                </div>
                <div style="height: 1px; background: #ccc;"></div>
                <img src="img/300img-logo-smal.png" class="f_left" />
            </div>

        </td>
    </tr>
</table>
<!--  START  -->
<!-- Първоначална позиция на малкия банер -->
<table style="margin:0 auto;">
    <tr>
        <td style=" max-height:500px;">
            <div style="position: static; bottom: 0px; left: 50%; right: 50%;"
            <div id="banner_l">
                <div id="large" style="width:728px; height:90px; margin:0 auto; box-shadow:0px 0px 30px #bbb;">
                    <script type="text/javascript"><!--
                    google_ad_client = "ca-pub-5472762465737265";
                    /* 728x90_new */
                    google_ad_slot = "6851057591";
                    google_ad_width = 728;
                    google_ad_height = 90;
                    //-->
                    </script>
                    <script type="text/javascript"
                            src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
                </div>
            </div>
            </div>
        </td>
    </tr>
</table>
<!--  END  -->

<footer>
    <p></p>
</footer>

<div style="width:1000px; height:500px; margin:0 auto;"></div>
</body>

</html>